/**
 * 组件扫描
 */
const componentField = require.context('./', true, /index.vue/)

// 组件通过对象导出
export default componentField.keys().reduce((components, field) => {
  const component = componentField(field).default
  components[component.name] = component
  return components
}, {})
